<{include file="../modules/_manager/header.html" title='Ship Manage'}>
<script src="<{$ROOTPATH}>/_manager/scripts/vars/ship.js.php"></script>
<script> jQuery(function($){page.init();}); </script>
<div class="block">
	<h1>ストック >> 輸入管理(<{$len}>件)</h1>
	<h2><a class="typeLink" onclick="page.todo(-1,2)">輸入情報を新規作成</a></h2>
	<{$sumjp = 0}>
	<{$sumus = 0}>
	<table class="table_list">
		<thead>
			<tr class="header">
				<td>日付</td>
				<td>日本円</td>
				<td>USドル</td>
				<td>レート</td>
				<td>記入者</td>
				<{if $login_levelno  gt 85}>
				<td>編集</td>
				<{/if}>
			</tr>
		</thead>
		<tbody>
			<{if $len == 0}>
				<tr>
					<td colspan="5">
						<span class="blank_data">
							暂时没有类信息[<a class="typeLink" onclick="page.todo(-1,2)">新規作成</a>]
						</span>
					</td>
				</tr>
			<{else}>
			<{foreach $listview as $entry}>
				<{if $entry@iteration is even by 1}>
					<tr class="iteration">
				<{else}>
					<tr>
				<{/if}>
					<td><{$entry.dates}></td>
					<td class="typeMoney nline"><{$entry.priceJp}><{$sumjp=$sumjp+$entry.priceJp}></td>
					<td class="typeMoney nline"><{$entry.priceUs}><{$sumus=$sumus+$entry.priceUs}></td>
					<td class="typeRate nline"><{$entry.priceJp/$entry.priceUs}></td>
					<td class="nline"><{$entry.name}></td>
					<{if $login_levelno gt 85}>
					<td>
						<a class="typeLink" onclick="page.todo(<{$entry.shipId}>,0)">編集</a>
						<input type="hidden" value="<{$entry.dates}>" id="ship_dates_hidden_<{$entry.shipId}>">
						<input type="hidden" value="<{$entry.priceJp}>" id="ship_priceJp_hidden_<{$entry.shipId}>">
						<input type="hidden" value="<{$entry.priceUs}>" id="ship_priceUs_hidden_<{$entry.shipId}>">
						<input type="hidden" value="<{$entry.adminId}>" id="ship_adminId_hidden_<{$entry.shipId}>">
					</td>
					<{/if}>
				</tr>
				<{/foreach}>
			<{/if}>
		</tbody>
		<tfoot class="header">
			<tr>
				<td>合計：</td>
				<td class="typeMoney"><{$sumjp}></td>
				<td class="typeMoney"><{$sumus}></td>
				<td class="typeRate"><{$sumjp/$sumus}></td>
				<{if $login_levelno gt 85}>
					<td colspan="2"></td>
				<{else}>
					<td></td>
				<{/if}>
			</tr>
		</tfoot>
	</table>
</div>
<div id="newship_form" class="new_form" style="display:none;">
	<div id="newship_form_title"></div>
	<div>
		<table>
			<tr>
				<td>日付:</td>
				<td>
					<input type="text" readonly="readonly" size="10"  id="new_form_dates" class="date" value="<{$DATENOW}>">
				</td>
			</tr>
			<tr>
				<td>仕入れ額（日本円）:</td>
				<td>
					<input type="text" value="" id="new_form_priceJp" onChange="utilityHandle.toHankaku(this)">
				</td>
			</tr>
			<tr>
				<td>仕入れ額（USドル）:</td>
				<td>
					<input type="text" value="" id="new_form_priceUs" onChange="utilityHandle.toHankaku(this)">
				</td>
			</tr>
		</table>
		<input type="hidden" value="0" id="ship_id_hidden">
	 	<a class="typeLink" id="new_form_ok" onclick="if($('#ship_id_hidden').val()==0)page.add(); else  page.update();">新規作成</a>
		<a class="typeLink" onclick="$.unblockUI();">Close</a>
	</div>
</div>


<{include file="../modules/_manager/footer.html"}>